#include  "main.h"
int A=4827,M=2147483647;
int Q=M/A;
int R=M%A;
/* function: generate random data
   parameter: the seed of generation random data*/

int randInt(int state0)
{ int tmpstate,state;
  tmpstate = A*(state0%Q) - R*(state0/Q);
  if( tmpstate >= 0 )
	state = tmpstate;
	else state = tmpstate+M;
	return state;
}
	
/*function: generate the infomation sequence
  parameter: *message poit to the information vector*/	
/*void  input(char *message)
{ int i;
  int state = 433;
  for( i= 0; i < InfoLength; i++ )
	{	state = randInt( state );
		message[i] = state%2;
	}
}*/

void input(char *message)
{
	int i;

//	printf("%d\n", InfoLength);
	for (i = 0; i <zero_len; i++)
		message[i] = 0;
	for (i = zero_len; i < InfoLength; i++)
		message[i] = rand() % 2;
	
}

void input_0(char *message)
{
	int i;

	for (i = 0; i < InfoLength; i++)
		message[i] = 0;
}
